package a.i;

import a.c.ab;
import a.c.bb;
import a.c.d;
import a.c.e;
import a.c.m;
import a.c.n;
import a.c.q;
import a.c.v;
import a.c.w;
import a.c.x;

public class y
{
  private q a;
  protected ab b;
  protected bb c;
  private boolean d = true;
  public static int e;
  
  public y(q paramq)
  {
    this.a = paramq;
    this.b = new ab();
    this.c = new bb();
  }
  
  public void a(boolean paramBoolean)
  {
    if (!p.b) {}
    this.d = (!paramBoolean);
  }
  
  public boolean a()
  {
    if (!p.b) {}
    return !this.d;
  }
  
  public void b()
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    do
    {
      w localw = this.a.v();
      while (!bool1)
      {
        if (!localw.e()) {
          break;
        }
        a(localw.d());
        localw.f();
      }
    } while (bool2);
  }
  
  public void c()
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    do
    {
      m localm = this.a.w();
      while (!bool1)
      {
        if (!localm.e()) {
          break;
        }
        a(localm.a());
        localm.f();
      }
    } while (bool2);
  }
  
  public void d()
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    do
    {
      m localm = this.a.w();
      while (!bool1)
      {
        if (!localm.e()) {
          break;
        }
        if (!bool2)
        {
          if (localm.a().g()) {
            a(localm.a());
          }
          localm.f();
        }
      }
    } while (bool2);
  }
  
  public void e()
  {
    d();
    f();
  }
  
  public void f()
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    x localx = this.a.B();
    w localw = this.a.v();
    label188:
    label210:
    label236:
    label238:
    do
    {
      do
      {
        if (!localw.e()) {
          break label241;
        }
        e locale1 = localw.d();
        if (bool1) {
          return;
        }
        m localm = locale1.l();
        d locald1;
        e locale2;
        do
        {
          do
          {
            if (!localm.e()) {
              break;
            }
            locald1 = localm.a();
            locale2 = locald1.a(locale1);
            d locald2 = (d)localx.get(locale2);
            if (bool2) {
              break label210;
            }
            if (bool1) {
              break label188;
            }
            if (locald2 != locald1) {
              if (locald2 == null)
              {
                localx.a(locale2, locald1);
                if (bool2) {
                  continue;
                }
                if (!bool1) {}
              }
              else
              {
                a(locald1);
              }
            }
            localm.f();
          } while (!bool1);
        } while (bool2);
        localm = locale1.l();
        do
        {
          if (!localm.e()) {
            break;
          }
          locald1 = localm.a();
          locale2 = locald1.a(locale1);
          localx.a(locale2, null);
          localm.f();
          if (bool2) {
            break label238;
          }
          if (bool1) {
            break label236;
          }
        } while (!bool1);
      } while (bool2);
      localw.f();
    } while (!bool1);
    label241:
    if (!bool2) {
      this.a.a(localx);
    }
  }
  
  public void g()
  {
    h();
    i();
  }
  
  public void h()
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    do
    {
      do
      {
        e locale;
        do
        {
          if (this.c.isEmpty()) {
            break;
          }
          locale = this.c.o();
        } while (this.a.h(locale));
        b(locale);
      } while (bool2);
    } while (!bool1);
  }
  
  public void i()
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    do
    {
      do
      {
        d locald;
        do
        {
          if (this.b.isEmpty()) {
            break;
          }
          locald = this.b.o();
        } while (this.a.j(locald));
        b(locald);
      } while (bool2);
    } while (!bool1);
  }
  
  public void a(e parame)
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    d locald1 = parame.i();
    d locald2;
    label75:
    label78:
    do
    {
      do
      {
        do
        {
          if (locald1 == null) {
            break label78;
          }
          locald2 = locald1;
          locald1 = locald1.j();
          this.b.c(locald2);
          if (bool1) {
            break label169;
          }
          if (!this.d) {
            break;
          }
          this.a.f(locald2);
          if (bool2) {
            break label75;
          }
        } while (!bool1);
        this.a.a(locald2);
      } while (!bool1);
    } while (bool2);
    locald1 = parame.h();
    label148:
    do
    {
      do
      {
        if (locald1 == null) {
          break label151;
        }
        locald2 = locald1;
        locald1 = locald1.i();
        this.b.c(locald2);
        if (bool1) {
          break label169;
        }
        if (!this.d) {
          break;
        }
        this.a.f(locald2);
        if (bool2) {
          break label148;
        }
      } while (!bool1);
      this.a.a(locald2);
    } while (!bool1);
    label151:
    this.c.c(parame);
    if (!bool2) {
      if (this.d)
      {
        label169:
        if (bool2) {
          break label195;
        }
        this.a.d(parame);
        if (!bool1) {
          return;
        }
      }
    }
    label195:
    this.a.a(parame);
  }
  
  public void a(d paramd)
  {
    boolean bool = p.b;
    this.b.c(paramd);
    if (!bool) {
      if (this.d)
      {
        if (bool) {
          break label47;
        }
        this.a.f(paramd);
        if (!p.a) {
          return;
        }
      }
    }
    label47:
    this.a.a(paramd);
  }
  
  public void a(ab paramab)
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    do
    {
      for (v localv = paramab.f(); !bool1; localv = localv.a())
      {
        if (localv == null) {
          break;
        }
        a((d)localv.c());
      }
    } while (bool2);
  }
  
  public void a(bb parambb)
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    do
    {
      for (v localv = parambb.f(); !bool1; localv = localv.a())
      {
        if (localv == null) {
          break;
        }
        a((e)localv.c());
      }
    } while (bool2);
  }
  
  public void a(m paramm)
  {
    boolean bool2 = p.b;
    do
    {
      boolean bool1 = p.a;
      while (!bool1)
      {
        if (!paramm.e()) {
          break;
        }
        a(paramm.a());
        paramm.f();
      }
    } while (bool2);
  }
  
  public void a(w paramw)
  {
    boolean bool2 = p.b;
    do
    {
      boolean bool1 = p.a;
      while (!bool1)
      {
        if (!paramw.e()) {
          break;
        }
        a(paramw.d());
        paramw.f();
      }
    } while (bool2);
  }
  
  public void a(a.c.y paramy)
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    label93:
    do
    {
      if (!paramy.e()) {
        break;
      }
      Object localObject = paramy.j();
      if (!bool2) {
        if ((localObject instanceof e))
        {
          a((e)localObject);
          if (bool2) {
            continue;
          }
          if (!bool1) {
            break label93;
          }
        }
      }
      if (!bool2)
      {
        if ((localObject instanceof d)) {
          a((d)localObject);
        }
      }
      else
      {
        if (bool2) {
          continue;
        }
        if (!bool1) {
          break label93;
        }
      }
      throw new ClassCastException("Node or Edge expected");
      paramy.f();
    } while (!bool1);
  }
  
  public static void a(q paramq, m paramm)
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    paramm.h();
    do
    {
      if (!paramm.e()) {
        break;
      }
      d locald = paramm.a();
      if (!bool2) {
        if (!paramq.h(locald.e())) {
          paramq.e(locald.e());
        }
      }
      if (!bool2) {
        if (!paramq.h(locald.f())) {
          paramq.e(locald.f());
        }
      }
      if (!bool2)
      {
        if (!paramq.j(locald)) {
          paramq.g(locald);
        }
        paramm.f();
      }
    } while (!bool1);
  }
  
  public static void b(q paramq, m paramm)
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    paramm.h();
    do
    {
      if (!paramm.e()) {
        break;
      }
      d locald = paramm.a();
      if (!bool2) {
        if (paramq.j(locald)) {
          paramq.f(locald);
        }
      }
      if (!bool2) {
        if (locald.e().c() == 0) {
          paramq.d(locald.e());
        }
      }
      if (!bool2)
      {
        if (locald.f().c() == 0) {
          paramq.d(locald.f());
        }
        paramm.f();
      }
    } while (!bool1);
  }
  
  public q j()
  {
    return this.a;
  }
  
  protected void b(d paramd)
  {
    boolean bool = p.b;
    if (!bool) {
      if (this.d)
      {
        if (bool) {
          break label38;
        }
        this.a.g(paramd);
        if (!p.a) {
          return;
        }
      }
    }
    label38:
    this.a.d(paramd);
  }
  
  public void c(d paramd)
  {
    if (paramd.c() == null) {
      b(paramd);
    }
    this.b.remove(paramd);
  }
  
  public void b(ab paramab)
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    ab localab = new ab();
    Object localObject1 = paramab.f();
    if (localObject1 != null) {}
    while (bool2)
    {
      localObject2 = (d)((v)localObject1).c();
      if (bool1) {
        break label81;
      }
      if (((d)localObject2).c() == null)
      {
        b((d)localObject2);
        localab.add(localObject2);
      }
      localObject1 = ((v)localObject1).a();
      if (!bool1) {
        break;
      }
    }
    label81:
    localObject1 = db.b(new boolean[this.a.l()]);
    Object localObject2 = localab.f();
    do
    {
      do
      {
        if (localObject2 == null) {
          break;
        }
        ((n)localObject1).a(((v)localObject2).c(), true);
        if (bool2) {
          break label151;
        }
        localObject2 = ((v)localObject2).a();
        if (bool1) {
          break label149;
        }
      } while (!bool1);
    } while (bool2);
    localObject2 = this.b.f();
    label149:
    label151:
    do
    {
      if (localObject2 == null) {
        break;
      }
      d locald = (d)((v)localObject2).c();
      if (!bool2)
      {
        if (locald.c() == this.a)
        {
          if (bool2) {
            continue;
          }
          if (((n)localObject1).getBool(locald)) {
            this.b.h((v)localObject2);
          }
        }
        localObject2 = ((v)localObject2).a();
      }
    } while (!bool1);
  }
  
  public void a(bb parambb, boolean paramBoolean)
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    bb localbb = new bb();
    Object localObject1 = parambb.f();
    if (localObject1 != null) {}
    while (bool2)
    {
      localObject2 = (e)((v)localObject1).c();
      if (bool1) {
        break label86;
      }
      if (((e)localObject2).g() == null)
      {
        b((e)localObject2);
        localbb.add(localObject2);
      }
      localObject1 = ((v)localObject1).a();
      if (!bool1) {
        break;
      }
    }
    label86:
    localObject1 = db.a(new boolean[this.a.j()]);
    Object localObject2 = localbb.f();
    do
    {
      do
      {
        if (localObject2 == null) {
          break;
        }
        ((x)localObject1).a(((v)localObject2).c(), true);
        if (bool2) {
          break label158;
        }
        localObject2 = ((v)localObject2).a();
        if (bool1) {
          break label156;
        }
      } while (!bool1);
    } while (bool2);
    localObject2 = this.c.f();
    label156:
    if (localObject2 != null)
    {
      label158:
      if (!bool1)
      {
        if (((e)((v)localObject2).c()).g() == this.a) {
          this.c.h((v)localObject2);
        }
        localObject2 = ((v)localObject2).a();
      }
    }
    else
    {
      while (bool2) {
        if (!bool1) {
          break;
        }
      }
      if (!paramBoolean) {
        return;
      }
      localObject2 = this.b.f();
    }
    label330:
    do
    {
      if (localObject2 == null) {
        break;
      }
      d locald = (d)((v)localObject2).c();
      if (!bool2)
      {
        if ((locald.e().g() == this.a) && (locald.f().g() == this.a))
        {
          if (!bool2) {
            if (!((x)localObject1).getBool(locald.f()))
            {
              if (bool2) {
                continue;
              }
              if (!((x)localObject1).getBool(locald.e())) {
                break label330;
              }
            }
          }
          this.b.h((v)localObject2);
          b(locald);
        }
        localObject2 = ((v)localObject2).a();
      }
    } while (!bool1);
  }
  
  public void a(e parame, boolean paramBoolean)
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    if (!bool2)
    {
      if (parame.g() == null) {
        b(parame);
      }
      if (!bool2) {
        this.c.remove(parame);
      }
    }
    else if (!paramBoolean)
    {
      return;
    }
    v localv = this.b.f();
    do
    {
      if (localv == null) {
        break;
      }
      d locald = (d)localv.c();
      if (((!bool2) && (((locald.e() != parame) || ((bool2) || (locald.f().g() != this.a))) && (bool2))) || ((locald.f() == parame) && ((bool2) || (locald.e().g() == this.a))))
      {
        this.b.h(localv);
        b(locald);
      }
      localv = localv.a();
    } while (!bool1);
  }
  
  protected void b(e parame)
  {
    boolean bool = p.b;
    if (!bool) {
      if (this.d)
      {
        if (bool) {
          break label38;
        }
        this.a.e(parame);
        if (!p.a) {
          return;
        }
      }
    }
    label38:
    this.a.c(parame);
  }
  
  public w k()
  {
    return this.c.l();
  }
  
  public m l()
  {
    return this.b.l();
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.i.y
 * JD-Core Version:    0.7.0.1
 */